import { apiHttp } from '/@/utils/axios';
import type { commonResponse } from './common'
import { PropType } from 'vue';



export interface qyMainBaseModel {
  compBusiAddr?:string ; //	办公地址	string
  compCeoName?:string ; //	法人	string
  compCreditCode?:string ; //	统一社会信用代码	string
  compEstDate?:number ; //	建立日期	string(date-time)
  compId?:string ; //	id	string
  compName?:string ; //	企业名称	string
  compRegAddr?:string ; //	注册地址	string
  compRegCapital?:number ; //	注册资本	number(double)
  compRegTypeName?:string ; //	注册类型	string
  compYyqx?:string ; //	营业期至	string
  regionCodeName?:string ; //	企业区划	string
}
export const detailProps = {
  detail: {
    type: Object as PropType<qyMainBaseModel>,
    default: {}
  }
}

export const getQyMainApi = params => {
  return apiHttp.post<commonResponse>({ url: '/foreign/qyMain', params },{ isTransformRequestResult: false });
}


export const getstaffApi = params => {
  return apiHttp.post<commonResponse>({ url: '/foreign/staff', params },{ isTransformRequestResult: false });
}

export const getCorpAptApi = params => {
  return apiHttp.post<commonResponse>({ url: '/foreign/corpApt', params },{ isTransformRequestResult: false });
}

export const getBranchApi = params => {
  return apiHttp.post<commonResponse>({ url: '/foreign/branch', params },{ isTransformRequestResult: false });
}

export const getForeignStaffApi = (t,params) => {
  enum Api {
    reg = '/foreign/staffReg',  //注册
    prof = '/foreign/staffTitle', //职称
    safe = '/foreign/staffSafety',  //安管
    post = '/foreign/staffProf',  //岗位
    tech = '/foreign/staffTech',  //技术
    spec = '/foreign/staffSpecial'  //特殊
  }
  return apiHttp.post<commonResponse>({ url: Api[t], params }, { isTransformRequestResult: false });
}


export const getCorpSafetyApi = params => {
  return apiHttp.post<commonResponse>({ url: '/foreign/corpSafety', params },{ isTransformRequestResult: false });
}

export const getQualDetailApi = params => {
  return apiHttp.post<commonResponse>({ url: '/notice/qualDetail', params },{ isTransformRequestResult: false });
}

export const getApplyPersonApi = params => {
  return apiHttp.post<commonResponse>({ url: '/notice/applyPerson', params },{ isTransformRequestResult: false });
}
